<!DOCTYPE html>
<!--suppress ThymeleafVariablesResolveInspection -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>
<div class="ui container">
    <a th:href="@{/toadd}">添加</a>
    <table border="1" cellpadding="0" cellspacing="0">
        <thead>
        <tr><th>id</th>
            <th>姓名</th>
            <th>生日</th>
            <th>操作</th>
        </tr></thead>
        <tbody>
        <tr th:each="user : ${user}">
            <td th:text="${user.id}"></td>
            <td th:text="${user.name}"></td>
            <td th:text="${#dates.format(user.birthday, 'yyyy-MM-dd')}"></td>
            <td>
                <a th:href="@{/findUserById/{id}(id=${user.id})}" >编辑</a>
                <a th:href="@{/delete/{id}(id=${user.id})}">删除</a>
            </td>
        </tr>
        </tbody>
    </table>
</div>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
</body>
</html>